home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / SRC / HOARDDLL.ZIP / 3rdParty / hoard / libhoard-2.0.2 / README < prev    next >
Encoding:
Text File  |  2000-03-14  |  5.5 KB  |  172 lines

  1. ===========================================================================
  2.  
  3.           The Hoard Multiprocessor Memory Allocator
  4.             <http://www.hoard.org>
  5.  
  6.                by Emery Berger
  7.         <http://www.cs.utexas.edu/users/emery>
  8.  
  9.   Copyright (c) 1998, 1999, 2000, The University of Texas at Austin.
  10.  
  11. ---------------------------------------------------------------------------
  12. emery@cs.utexas.edu                | <http://www.cs.utexas.edu/users/emery>
  13. Department of Computer Sciences    |             <http://www.cs.utexas.edu>
  14. University of Texas at Austin      |                <http://www.utexas.edu>
  15. ===========================================================================
  16.  
  17.  
  18. What's Hoard?
  19. -------------
  20.  
  21. The Hoard memory allocator is a fast, scalable, and memory-efficient
  22. memory allocator for shared-memory multiprocessors.
  23.  
  24. Why Hoard?
  25. ----------
  26.  
  27. Multithreaded programs that perform dynamic memory allocation do not
  28. scale because the heap is a bottleneck. When multiple threads
  29. simultaneously allocate or deallocate memory from the heap, they will
  30. be serialized while waiting for the heap lock. Programs making
  31. intensive use of the heap actually slow down as the number of
  32. processors increases. (Note: If you make a lot of use of the STL, you
  33. may not know it, but you are making a lot of use of the heap.)
  34.  
  35. Hoard is a fast allocator that solves this problem. In addition, it
  36. has very reasonable bounds on memory consumption.
  37.  
  38.  
  39. How do I use it?
  40. ----------------
  41.  
  42. Using Hoard is easy. It is written to work on any variant of UNIX that
  43. supports pthreads, and should compile out of the box using make.  (See
  44. INSTALL for more details. Also, if you're using Windows or the BeOS,
  45. please read the appropriate NOTES file.)
  46.  
  47. You can build Hoard in one of two ways (see INSTALL). Below, I assume
  48. you used the configure script.
  49.  
  50. To link Hoard with the program foo (after doing "make install"):
  51.  
  52.     Linux:
  53.       g++ foo.o -L/usr/local/lib -lhoard -lpthread -o foo
  54.  
  55.     Solaris:
  56.       g++ foo.o -L/usr/local/lib -lhoard -lthread -lrt -o foo
  57.  
  58. You *must* add "-lpthread" or "-lthread" to your list of libraries
  59. (except if you're using the sproc library on the SGI). Don't forget to
  60. add /usr/local/lib to your LD_LIBRARY_PATH environment variable.
  61.  
  62. In UNIX, you might be able to avoid relinking your application and use
  63. Hoard just by changing the environment variable LD_PRELOAD, as in
  64.  
  65.     setenv LD_PRELOAD "/lib/libpthread.so.0 /usr/local/lib/libhoard.so"
  66.  
  67. This won't work for applications compiled with the "-static" option.
  68.  
  69.  
  70. Did it work?
  71. ------------
  72.  
  73. When you compile Hoard ("make"), you'll get six test programs:
  74. testmymalloc(-hoard), threadtest(-hoard), and
  75. cache-scratch(-hoard). The first one is just to measure raw,
  76. uniprocessor speed. The second one lets you observe scalability with
  77. multiple threads. The third tests the cache locality of your
  78. allocator (see cache-scratch.cpp for more details).
  79.  
  80. ** NOTE: using the configure script dynamically links these
  81. ** (*-hoard) to the Hoard library. Static linking (using "make -f
  82. ** Makefile.orig") improves performance (at the cost of increasing the
  83. ** size of the executable).
  84.  
  85. For instance,
  86.  
  87.     threadtest 2 1 800000
  88.  
  89. will create two threads that will each allocate and free 400,000
  90. bytes. Compare this to
  91.  
  92.     threadtest-hoard 2 1 800000
  93.  
  94. (the same program as above, but linked with Hoard).
  95.  
  96. Likewise, try
  97.  
  98.     testmymalloc 100000 1
  99. and
  100.     testmymalloc-hoard 100000 1
  101.  
  102. to compare Hoard's uniprocessor performance with the stock allocator.
  103.  
  104. For cache-scratch, try the following (on a P-processor machine):
  105.  
  106.    cache-scratch 1 1000 1 1000000
  107.    cache-scratch P 1000 1 1000000
  108.  
  109.    cache-scratch-hoard 1 1000 1 1000000
  110.    cache-scratch-hoard P 1000 1 1000000
  111.  
  112. The ideal is a P-fold speedup.
  113.  
  114. Hoard has been successfully built on a 2-processor x86 running Windows
  115. NT SP4 with and without CygWin, a 4-processor x86 box running Linux
  116. (Red Hat 6.0, kernel version 2.2.5-22 SMP), a 14-processor SPARC
  117. running Solaris 7, a 56-processor SGI Origin 2000 (cc/NUMA
  118. architecture), and a 4-processor IBM F50 (PowerPC-based) under AIX.
  119.  
  120.  
  121. More information
  122. ----------------
  123.  
  124. For more information on Hoard, along with some nice performance graphs, see
  125.  
  126.     Hoard: A Fast, Scalable and Memory-Efficient Allocator
  127.            for Shared-Memory Multiprocessors
  128.     September 1999
  129.     University of Texas Dept. of Computer Sciences
  130.     UTCS-TR99-22.
  131.  
  132.     (Included in this distribution in docs/UTCS-TR99-22.ps.gz)
  133.  
  134. The latest version of Hoard will always be available from the Hoard web page:
  135.  
  136.     <http://www.hoard.org>
  137.  
  138.  
  139. Feedback
  140. --------
  141.  
  142. Please send any bug reports and information about new platforms Hoard
  143. has been built on to emery@cs.utexas.edu.
  144.  
  145.  
  146. Mailing lists
  147. -------------
  148.  
  149. There are two mailing lists for Hoard: hoard-announce, a low-volume
  150. mailing list for announcements of new releases of Hoard, and hoard,
  151. a mailing list for Hoard-related discussions.
  152.  
  153. To subscribe, go to the Hoard home page (www.hoard.org) and enter your
  154. e-mail address in the appropriate box.
  155.  
  156.  
  157. Acknowledgements
  158. ----------------
  159.  
  160. In addition to those thanked in the paper, I'd like to thank Ganesan
  161. Rajagopal for submitting the autoconf and automake scripts, John
  162. Hickin and Paul Larson for improving the NT port, and Trey Boudreau
  163. for the BeOS port. Thanks also to Kevin Mills, Robert Fleischman,
  164. Martin Bachtold, and John Hickin.
  165.  
  166.  
  167. --
  168. Emery Berger                           | Parallel Programming
  169. emery@cs.utexas.edu                    | & Multiprogramming MP Groups 
  170. <http://www.cs.utexas.edu/users/emery> | University of Texas at Austin
  171.  
  172.